package de.velvettear.squirrel.kernel;

import java.io.File;

import android.os.Environment;
import de.velvettear.squirrel.database.DatabaseHelper;

public class Statics {
	
	/* ------------------
	 * Name der Anwendung
	   ------------------ */
	public static final String APP_NAME = "Squirrel";
	
	/* ---------
	 * Datenbank
	   --------- */
	public static DatabaseHelper DATABASEHELPER;
	public static final String DATABASE_NAME = APP_NAME;
	public static final int DATABASE_VERSION = 1;
		
	/* ----------------------
	 * MySQL-Datenbank
	   ---------------------- */
	
	String host = "velvettear.no-ip.org";
	String user = "joomla";
	String password = "force099";
	String database = "joomla";
	
	public static final String MYSQL_HOST = "velvettear.no-ip.org";
	public static final String MYSQL_JOOMLA_DATABASE = "joomla";
	public static final String MYSQL_JOOMLA_PREFIX = "rdk4e_";
	public static final String MYSQL_JOOMLA_USER = "joomla";
	public static final String MYSQL_JOOMLA_PASSWORD = "force099";
	public static final String MYSQL_JABBER_DATABASE = "jabber";
	public static final String MYSQL_JABBER_USER = "jabber";
	public static final String MYSQL_JABBER_PASSWORD = "force099";
	
	/* ----------------------
	 * Fragment-Ueberschriften
	   ---------------------- */
	public static final String NETWORK = "NETWORK";
	public static final String PORTS = "PORTS";
	public static final String ACCESS_POINTS = "ACCESS POINTS";
	public static final String PING = "PING";
	public static final String UNZIP = "UNZIP";
	public static final String ZIP = "ZIP";
	public static final String PASSWORD_GENERATOR = "PASSWORD GENERATOR";
	public static final String PASSWORD_STORE = "PASSWORD STORE";
	public static final String CONTACTLIST = "CONTACT LIST";
	public static final String CHAT = "CHAT";
	public static final String SHORTCUTS = "SHORTCUTS";
	public static final String NFC_TAGS = "NFC TAGS";
	public static final String TAG_EDITOR = "TAG EDITOR";
	
	/* ------------
	 * Fragment-IDs
	   ------------ */
	public static final int ID_NETWORKFRAGMENT_NETWORK = 0;
	public static final int ID_NETWORKFRAGMENT_PORTS = 1;
	public static final int ID_NETWORKFRAGMENT_ACCESSPOINTS = 2;
	public static final int ID_NETWORKFRAGMENT_PING = 3;
	public static final int ID_ZIPFRAGMENT_UNZIP = 0;
	public static final int ID_ZIPFRAGMENT_ZIP = 1;
	public static final int ID_SECURITYFRAGMENT_PASSWORDGENERATOR = 0;
	public static final int ID_SECURITYFRAGMENT_PASSWORDSTORE = 1;
	public static final int ID_SETTINGSFRAGMENT_CHATSETTINGS = 0;
	public static final int ID_CHATFRAGMENT_CONTACTLIST = 0;
	public static final int ID_CHATFRAGMENT_CHAT = 1;
	public static final int ID_NFCFRAGMENT_TAGLIST = 0;
	public static final int ID_NFCFRAGMENT_TAGEDITOR = 1;

	/* -------------
	 * Intent-Extras
	   ------------- */
	public static final String INTENT_BRUTEFORCE = "INTENT_BRUTEFORCE";
	public static final String INTENT_BRUTEFORCERESULT = "INTENT_BRUTEFORCERESULT";
	
	/* --------
	 * Timeouts
	   -------- */		
	public static final int PING_TIMEOUT = 500;

	/* ------
	 * Filter
	   ------ */	
	public static final String FILTER_OPEN = "OPEN";
	public static final String FILTER_CLOSED = "CLOSED";
	public static final String FILTER_ALL = "ALL";
		
	/* --------------
	 * Root-Kommandos
	   -------------- */
	public static final String[] ROOT_COMMANDS = new String[] {"/system/xbin/which su", "/system/bin/which su", "which su"};

	/* --------------
	 * Wifi-Signalst�rken
	   -------------- */
	public static final String SIGNAL_EXCELLENT = "SIGNAL_EXCELLENT";
	public static final String SIGNAL_GOOD = "SIGNAL_GOOD";
	public static final String SIGNAL_LOW = "SIGNAL_LOW";
	public static final String SIGNAL_BAD = "SIGNAL_BAD";
	
	/* ----------
	 * Characters
	   ---------- */
	public static final int CHARACTERS_LOWERCASE_FIRST = 97;
	public static final int CHARACTERS_LOWERCASE_LAST = 122;
	public static final int CHARACTERS_UPPERCASE_FIRST = 65;
	public static final int CHARACTERS_UPPERCASE_LAST = 90;
	public static final int CHARACTERS_NUMERIC_FIRST = 48;
	public static final int CHARACTERS_NUMERIC_LAST = 57;
	public static final int[] CHARACTERS_SPECIALCHARS = new int[] {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 58, 59, 60, 61, 62, 63, 64, 91, 92, 93, 94, 95, 96, 123, 124, 125, 126};
		
	/* ---------------------
	 * Handler-Message-Typen
	   --------------------- */
	public static final String HANDLER_SPLASH = "HANDLER_SPLASH";
	public static final String HANDLER_BRUTEFORCE = "HANDLER_BRUTEFORCE";
	public static final String HANDLER_PICTURE = "HANDLER_PICTURE";
	public static final String HANDLER_GPS = "HANDLER_GPS";
	public static final String HANDLER_DIALOG = "HANDLER_DIALOG";
	public static final String HANDLER_CHAT = "HANDLER_CHAT";
	public static final String HANDLER_SETTINGS = "HANDLER_SETTINGS";
	
	/* ----------------
	 * Handler-Messages
	   ---------------- */
	public static final String MESSAGE_SPLASH = "MESSAGE_SPLASH";
	public static final String MESSAGE_BRUTEFORCE_PASSWORD = "MESSAGE_BRUTEFORCE_PASSWORD";
	public static final String MESSAGE_BRUTEFORCE_COUNT = "MESSAGE_BRUTEFORCE_COUNT";
	public static final String MESSAGE_BRUTEFORCE_INCREMENT = "MESSAGE_BRUTEFORCE_INCREMENT";
	public static final String MESSAGE_PICTURE_PATH = "MESSAGE_PICTURE_PATH";
	public static final String MESSAGE_PICTURE_COMMAND = "MESSAGE_PICTURE_COMMAND";
	public static final String MESSAGE_GPS_LOCATION = "MESSAGE_GPS_LOCATION";
	public static final String MESSAGE_GPS_COMMAND = "MESSAGE_GPS_COMMAND";
	public static final String MESSAGE_CHAT_CONTACTLIST = "MESSAGE_CHAT_CONTACTLIST";
			
	/* ---------------
	 * Intent-Requests
	   --------------- */
	public static final int REQUEST_FILEEXPLORER = 0;
	public static final int REQUEST_NFC = 1;
	
	/* -------------------------
	 * Unterstuetzte Dateiformate
	   ------------------------- */
	public static final String[] EXTENSIONS_ZIP = new String[] {".zip"};
	
	/* ----------------------
	 * Werte fuer Numberpicker
	   ---------------------- */
	public static final int NUMBERPICKER_PASSWORDLENGTH_DEFAULT = 10;
	public static final int NUMBERPICKER_PASSWORDLENGTH_MIN = 1;
	public static final int NUMBERPICKER_PASSWORDLENGTH_MAX = 100;
	public static final int NUMBERPICKER_PASSWORDQUANTITY_DEFAULT = 1;
	public static final int NUMBERPICKER_PASSWORDQUANTITY_MIN = 1;
	public static final int NUMBERPICKER_PASSWORDQUANTITY_MAX = 1000;
	
	/* -----
	 * Pfade
	   ----- */
	public final static String PATH_HOME = Environment.getExternalStorageDirectory().toString() + File.separator + APP_NAME;
	public final static String PATH_DATABASE = PATH_HOME + File.separator + APP_NAME;
	public final static String PATH_PICTURES = PATH_HOME + File.separator + "PICTURES";
	
	/* -----
	 * Email
	   ----- */
	public final static String EMAIL_AUTHORITY = "com.google.android.gm";
	public final static String EMAIL_PERMISSION =  "com.google.android.gm.permission.READ_CONTENT_PROVIDER";
	public final static String EMAIL_PACKAGE = "com.google.android.gm";
	public final static String EMAIL_ACCOUNT_TYPE = "com.google";
	public final static String[] EMAIL_FEATURES = {"service_mail"};
		
	/* -----------
	 * SecurityCam
	   ----------- */
	public final static String SECURITYCAM_ACTIVATED = "SECURITYCAM_ACTIVATED";
	public final static String SECURITYCAM_DEACTIVATED = "SECURITYCAM_DEACTIVATED";
	public final static String SECURITYCAM_MODE_FTP = "SECURITYCAM_MODE_FTP";
	public final static String SECURITYCAM_MODE_LOCAL = "SECURITYCAM_MODE_LOCAL";
	
	/* ---------
	 * Shortcuts
	   --------- */
	public final static String SHORTCUTS_MODE_URL = "SHORTCUTS_MODE_URL";
	public final static String SHORTCUTS_MODE_APP = "SHORTCUTS_MODE_APP";
		
	/* ---------
	 * Kommandos
	   --------- */
	public final static String COMMAND = "COMMAND";
	
	/* ------------------
	 * Dialog-Kommandos
	   ------------------ */
	public final static String COMMAND_DIALOG_OK = "COMMAND_DIALOG_OK";	
	public final static String COMMAND_DIALOG_CANCEL = "COMMAND_DIALOG_CANCEL";	
	public final static String COMMAND_DIALOG_SPECIFIC = "COMMAND_DIALOG_SPECIFIC";	
	
	/* ------------------
	 * Settings-Kommandos
	   ------------------ */	
	public final static String COMMAND_SETTINGS_CHAT = "COMMAND_SETTINGS_CHAT";
	
	/* --------------
	 * Chat-Kommandos
	   -------------- */
	public final static String COMMAND_CHAT_LOGIN = "COMMAND_CHAT_LOGIN_OK";
	public final static String COMMAND_CHAT_ACCOUNTCREATION = "COMMAND_CHAT_ACCOUNTCREATION";
	public final static String COMMAND_CHAT_ACCOUNTDELETION = "COMMAND_CHAT_ACCOUNTDELETION";
	public final static String COMMAND_CHAT_CONTACTLIST = "COMMAND_CHAT_CONTACTLIST";
	public final static String COMMAND_CHAT_PRESENCE = "COMMAND_CHAT_PRESENCE";
	
	/* --------------
	 * Bilder-Kommandos
	   -------------- */
	public final static String COMMAND_SECURITYCAM_FTP = "COMMAND_SECURITYCAM_FTP";
	public final static String COMMAND_SECURITYCAM_LOCAL = "COMMAND_SECURITYCAM_LOCAL";
	
	/* ----------------
	 * Intent-Kommandos
	   ---------------- */
	public final static String COMMAND_INTENT_SETTINGS = "COMMAND_INTENT_SETTINGS";
	
	/* ----------------
	 * Notification-IDs
	   ---------------- */
	public final static int NOTIFICATION_ID_LED = 0;
	public final static int NOTIFICATION_ID_NFC = 1;
	
	/* ----------------
	 * Allgemeine Stati
	   ---------------- */
	public final static String STATUS_ACTIVE = "STATUS_ACTIVE";	
	public final static String STATUS_INACTIVE = "STATUS_INACTIVE";
	public final static String STATUS_SUCESS = "STATUS_SUCCESS";
	public final static String STATUS_ERROR = "STATUS_ERROR";
	public final static String STATUS_FINISHED = "STATUS_FINISHED";
	public final static String STATUS_UNFINISHED = "STATUS_UNFINISHED";
 	
	/* --------
	 * NFC-Tags
	   -------- */
	public final static String NFC_RETURN_MODE = "NFC_RETURN_MODE";
	public final static String NFC_TYPE_URL = "NFC_TYPE_URL";
	public final static String NFC_TYPE_APP = "NFC_TYPE_APP";
	public final static String NFC_EXTRA_WLAN = "NFC_EXTRA_WLAN";
	public final static String NFC_EXTRA_BLUETOOTH = "NFC_EXTRA_BLUETOOTH";
	
	/* ----------
	 * Exceptions
	   ---------- */
	public final static String EXCEPTION_CHAT_CONFLICT = "conflict";
	public final static String EXCEPTION_CHAT_NOTALLOWED = "not-allowed";
	
	/* ----
	 * Chat
	   ---- */
	public final static String CHAT_LOGIN_OK = "CHAT_LOGIN_OK";	
	public final static String CHAT_LOGIN_FAILED = "CHAT_LOGIN_FAILED";
	public final static String CHAT_MODE_ONLINE = "ONLINE";
	public final static String CHAT_MODE_BUSY = "BUSY";
	public final static String CHAT_MODE_AWAY = "AWAY";
	public final static String CHAT_MODE_DND = "DND";
	public final static String CHAT_TYPE_LOGGEDIN = "CHAT_TYPE_LOGGEDIN";
	public final static String CHAT_TYPE_LOGGEDOFF = "CHAT_TYPE_LOGGEDOFF";
	
	/* -------------
	 * Einstellungen
	   ------------- */
	public final static String SETTINGS_MAILSERVICE_SENDER = "SETTINGS_MAILSERVICE_SENDER";
	public final static String SETTINGS_MAILSERVICE_ACCOUNT = "SETTINGS_MAILSERVICE_ACCOUNT";
	public final static String SETTINGS_MAILSERVICE_STATUS = "SETTINGS_MAILSERVICE_STATUS";
	public final static String SETTINGS_MAILSERVICE_SLEEP = "SETTINGS_MAILSERVICE_SLEEP";
	
	public final static String SETTINGS_CHAT_ACTIVATED = "SETTINGS_CHAT_ACTIVATED";
	public final static String SETTINGS_CHAT_HOST = "SETTING_CHAT_HOST";
	public final static String SETTINGS_CHAT_PORT = "SETTINGS_CHAT_PORT";
	public final static String SETTINGS_CHAT_SERVICE = "SETTINGS_CHAT_SERVICE";
	public final static String SETTINGS_CHAT_USERNAME = "SETTINGS_CHAT_USERNAME";
	public final static String SETTINGS_CHAT_ALIAS = "SETTINGS_CHAT_ALIAS";
	public final static String SETTINGS_CHAT_PASSWORD = "SETTINGS_CHAT_PASSWORD";
	public final static String SETTINGS_CHAT_MODE = "SETTINGS_CHAT_MODE";
	public final static String SETTINGS_CHAT_STATUS = "SETTINGS_CHAT_STATUS";
	
	
	public final static String[] SETTINGS = {SETTINGS_MAILSERVICE_SENDER, SETTINGS_MAILSERVICE_ACCOUNT, SETTINGS_MAILSERVICE_STATUS, SETTINGS_MAILSERVICE_SLEEP,
		SETTINGS_CHAT_ACTIVATED, SETTINGS_CHAT_HOST, SETTINGS_CHAT_PORT, SETTINGS_CHAT_SERVICE, SETTINGS_CHAT_USERNAME, SETTINGS_CHAT_ALIAS, SETTINGS_CHAT_PASSWORD, SETTINGS_CHAT_MODE, SETTINGS_CHAT_STATUS};
	
}
